package enumdemo1;

public class Test {
    public static void main(String[] args) {
        //枚举做信息标志和分类：参数受枚举类约束
        print(Direction.NORTH);//这里可以改变点的参数
    }
    public static void print(Direction d)
    {
        switch(d)
        {
            case NORTH:
                System.out.println("NORTH");
                break;
            case SOUTH:
                System.out.println("SOUTH");
                break;
            case EAST:
                System.out.println("EAST");
                break;
            case WEST:
                System.out.println("WEST");
                break;
        }
    }
}
